package com.oig.sys.msg.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;


/**
 * @author wuxl
 * 异步导出任务表
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_export_task")
@EntityListeners({AuditingEntityListener.class})
public class TbExportTask implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 */
	@Column(name = "name")
	private String name;

	/**
	 * 状态 01-正在生成文件 02-已完成 03-已下载
	 */
	@Column(name = "status")
	private String status;

	/**
	 */
	@Column(name = "file_url")
	private String fileUrl;

	/**
	 */
	@Column(name = "file_name")
	private String fileName;

	/**
	 */
	@Column(name = "file_id")
	private String fileId;

	/**
	 */
	@Column(name = "create_user_id")
	private Integer createUserId;

	/**
	 */
	@Column(name = "create_user_name")
	private String createUserName;

	/**
	 */
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private java.util.Date createTime;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;

	/**
	 */
	@Column(name = "tenant_id")
	private Integer tenantId;

	/**
	 */
	@Column(name = "tenant_name")
	private String tenantName;

	/**
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_download_time")
	private java.util.Date lastDownloadTime;

	@Column(name = "del_flag")
	public String delFlag;
}
